/*
 * @Author: xiaosihan 
 * @Date: 2023-12-16 18:33:45 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2023-12-16 18:41:12
 */


import { autorun } from "mobx";
import { ReactNode, useEffect, useRef, useState } from "react";
import styles from "./preyiewBtn.module.less";
import { ZoomInOutlined } from "@ant-design/icons";
import previewModalStore from "../PreviewModal/previewModalStore";

interface Iprops {
    children?: ReactNode
}

// 打开预览弹窗按钮
export default function PreyiewBtn(props: Iprops) {

    const dom = useRef<HTMLDivElement | null>(null);
    const [data, setData] = useState({});

    useEffect(() => {

    }, []);

    useEffect(() => autorun(() => {

    }), []);

    const open = () => {
        previewModalStore.setOpen(true);
    }

    return (
        <div
            onClick={() => open()}
            className={styles.preyiewBtn}
        >
            <ZoomInOutlined />
        </div>
    );

}